﻿using System;
using System.Collections.Generic;

namespace Gmantis.Uploader
{
    public class FilePackagerSingleFile : FilePackager
    {
        public override long GetMaxSizePerUpload()
        {
            long num = 0L;
            foreach (UploadFileInfo info in base.Files)
            {
                num = Math.Max(num, info.GetSize());
            }
            return num;
        }

        public override IEnumerable<UploadFilePartPackage> GetPackages()
        {
            foreach (UploadFileInfo iteratorVariable0 in this.Files)
            {
                UploadFilePartPackage iteratorVariable1 = new UploadFilePartPackage
                {
                    ServerWaitForOneFile = true
                };
                iteratorVariable1.Add(new UploadFilePartInfo(iteratorVariable0));
                yield return iteratorVariable1;
            }
        }
    }
}
